<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                template="/WEB-INF/template.xhtml">

    <ui:define name="title">
        Charts - <span class="subitem">Interactive</span>
    </ui:define>

    <ui:define name="description">
        When a dataset data is clicked, information can be passed to a backing bean using itemSelect ajax behavior.
    </ui:define>

    <ui:param name="documentationLink" value="/components/charts?id=interactive-chart" />

    <ui:define name="implementation">
        <h:form>
            <p:growl id="growl" showDetail="true" />
            
            <p:barChart model="#{chartJsView.barModel2}" style="width: 100%; height: 500px;">
                <p:ajax event="itemSelect" listener="#{chartJsView.itemSelect}" update="growl"/>
            </p:barChart>
        </h:form>
    </ui:define>

</ui:composition>
